@extends('layouts.app')
@section('content')
<div class="page-container">
	<div class="cl  bg-1 bk-gray">
        <span class="">&nbsp;&nbsp;{{date('Y-m-d',strtotime($startdate))}} 到 {{date('Y-m-d',strtotime($enddate))}} , 涨跌百分比在<strong> {{$percent}}% </strong>的股票，共有数据：<strong>{{$stocks->count()}}</strong> 条</span> 
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
     </div>
	<div class="mt-20">
	<table class="table table-border table-bordered table-hover table-bg table-sort">
		<thead>
			<tr class="text-c">
				<th width="80">ID</th>
				<th width="100">股票名称</th>
				<th width="40">股票代码</th>
				<th width="90">涨跌百分比</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
              @foreach ($stocks as $key=>$stock)
        	    <tr class="text-c">
                  <td>{{$key+1}}</td>
                    <td>{{$stock->name}}</td>
                    <td>{{$stock->code}}</td>
                    <td>{{$stock->percent}}%</td>
                    <td> 
                        @if(substr($stock->code,0,1)==6)
                            <a href='http://quotes.money.163.com/0{{$stock->code}}.html' target='_blank' > 查看行情</a> | 
                        @else
                        <a href='http://quotes.money.163.com/1{{$stock->code}}.html' target='_blank' > 查看行情</a> | 
                        @endif
                        <a href='{{url("historyData",[$stock->code])}}' > 历史数据</a>
                    </td>
                </tr>
             @endforeach
		</tbody>
	</table>
	</div>
</div>

@endsection